package net.lab1024.sa.user.module.business.course.dao;

import java.util.List;
import net.lab1024.sa.user.module.business.course.domain.entity.StudentEntity;
import net.lab1024.sa.user.module.business.course.domain.form.StudentQueryForm;
import net.lab1024.sa.user.module.business.course.domain.vo.StudentVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 学员 Dao
 *
 * @Author jabari
 * @Date 2023-08-05 17:22:36
 * @Copyright 51dev.cn
 */

@Mapper
@Component
public interface StudentDao extends BaseMapper<StudentEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<StudentVO> queryPage(Page page, @Param("queryForm") StudentQueryForm queryForm);

    /**
     * 更新删除状态
     */
    long updateDeleted(@Param("studentId")Integer studentId,@Param("deletedFlag")boolean deletedFlag);
    /**
     * 批量更新删除状态
     */
    void batchUpdateDeleted(@Param("idList")List<Integer> idList,@Param("deletedFlag")boolean deletedFlag);

}
